<template>
  <div class="post-wrapper">
    <div class="search-wrapper">
      <el-row class="search-bar" type="flex" justify="space-between">
        <input type="text" placeholder="请输入想去的地方，比如：'广州'" />
        <i class="el-icon-search"></i>
      </el-row>

      <div class="search-recommend">
        推荐:
        <span>广州</span>
        <span>上海</span>
        <span>北京</span>
      </div>

      <el-row
        class="post-title"
        type="flex"
        justify="space-between"
        align="middle"
      >
        <h4>推荐攻略</h4>
        <el-button type="primary" icon="el-icon-edit">写游记</el-button>
      </el-row>
    </div>

    <mainChild />
  </div>
</template>

<script>
import mainChild from "./mainChildren/mainChild";
export default {
  components: {
    mainChild
  }
};
</script>

<style lang="less" scoped>
.post-wrapper {
  width: 700px;

  .search-bar {
    width: 100%;
    box-sizing: border-box;
    height: 40px;
    line-height: 40px;
    border: 3px solid orange;

    input {
      flex: 1;
      padding: 0 20px;
      line-height: 40px;
      outline: none;
      border: none;
      background: none;
    }

    i {
      position: absolute;
      top: 50%;
      right: 0;
      transform: translate(-50%, -50%);
      font-size: 24px;
      color: orange;
      font-weight: 700;
    }
  }

  .search-recommend {
    padding: 10px 0;
    font-size: 12px;
    color: #666;
  }

  .post-title {
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
    position: relative;

    h4 {
      color: orange;
      font-size: 18px;
      font-weight: 400;
    }
    &::after {
      display: block;
      content: "";
      width: 72px;
      height: 2px;
      background: orange;
      position: absolute;
      bottom: 0;
      left: 0;
    }
  }
}
</style>
